home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
-
- #include <proto/dos.h>
-
- int fseek(FILE *f,long offset,int origin)
- {
- if(!f) return(1);
- if(origin==SEEK_CUR){
- if(f->flags&_READ) offset-=f->count;
- /* if(f->flags&_WRITE) offset+=f->count;*/
- }
- if(f->flags&_WRITE) _flushbuf(f);
- f->flags&=~(_READ|_WRITE|_EOF);
- f->count=0;
- Seek((BPTR)f->filehandle,offset,origin);
- return(0);
- }
-